import 'package:finance_app/src/entities/role_permission_entity.dart';
import 'package:flutter/cupertino.dart';

class InviteMemberModel {
  int employeeId;
  TextEditingController nameController = TextEditingController();
  FocusNode nameFocusNode = FocusNode();
  String countryCode;
  TextEditingController phoneController = TextEditingController();
  FocusNode phoneFocusNode = FocusNode();
  String type;
  RolePermissionEntity role;

  TextEditingController emailController = TextEditingController();
  FocusNode emailFocusNode = FocusNode();
  int radioSelect = 0;

  void dispose() {
    nameController.dispose();
    nameFocusNode.dispose();
    phoneController.dispose();
    phoneFocusNode.dispose();

    emailController.dispose();
    emailFocusNode.dispose();
  }

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is InviteMemberModel &&
          runtimeType == other.runtimeType &&
          nameController == other.nameController &&
          nameFocusNode == other.nameFocusNode &&
          countryCode == other.countryCode &&
          phoneController == other.phoneController &&
          phoneFocusNode == other.phoneFocusNode &&
          type == other.type;

  @override
  int get hashCode =>
      nameController.hashCode ^
      nameFocusNode.hashCode ^
      countryCode.hashCode ^
      phoneController.hashCode ^
      phoneFocusNode.hashCode ^
      type.hashCode;
}
